#ifndef XOSTREAM_H
#define XOSTREAM_H

#include <iostream>
#include <ostream>

using std::cout;

#include "colored_stream.h"

// cout wrapper
class Xostream : public Colored_stream
{
    public:
        Xostream( color text = GREY, color background = BLACK )
            :Colored_stream( text, background )
        {}
        ~Xostream() {}

        template<typename T>
        Xostream& operator << ( T i ) {
            this->enable_color();
            cout << i;
            this->disable_color();
            return *this;
        }

        typedef std::ostream&( *Func )( std::ostream& );

        Xostream& operator << ( Func i ) {
            cout << i;
            return *this;
        }
    protected:
    private:
};

#endif // XOSTREAM_H
